{% if page.requirejs %}
<script data-main="{{ site.baseurl }}/js/require-main.js" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script>
{% else %}
<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=default%2Ces5%2Ces6%2Ces7"></script>
<!-- Syntax highlighting via Prism -->
<script src="{{ site.baseurl }}/js/prism.js"></script>
<!-- Shuffle! -->
<script src="{{ site.baseurl }}/dist/shuffle.js"></script>
{% endif %}
<script src="{{ site.baseurl }}/js/site-nav.js"></script>

{% if page.externalJS %}
{% for src in page.externalJS %}
<script src="{{ src }}"></script>
{% endfor %}
{% endif %}

{% if page.extraJS && page.extraJS.length %}
{% for src in page.extraJS %}
<script src="{{ site.baseurl }}/js/{{ src }}"{% if page.jsType %} type="{{ page.jsType }}"{% endif %}></script>
{% endfor %}
{% endif %}

{% if site.environment == "production" %}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-39355642-1', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
{% endif %}
